package com.student.status.service.serviceimpl;

import com.student.status.dao.UserDao;
import com.student.status.model.UserInfoEntity;
import com.student.status.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public UserInfoEntity selectById(UserInfoEntity userInfoEntity) {
        return userDao.selectById(userInfoEntity);
    }

    @Override
    public UserInfoEntity selectName(UserInfoEntity userInfoEntity) {
        return userDao.selectName(userInfoEntity);
    }

    @Override
    public UserInfoEntity selectPwd(UserInfoEntity userInfoEntity) {
        return userDao.selectPwd(userInfoEntity);
    }

    @Override
    public List<UserInfoEntity> selectAll() {
        return userDao.selectAll();
    }

    @Override
    public int saveUser(UserInfoEntity userInfoEntity) {
        return userDao.saveUser(userInfoEntity);
    }

    @Override
    public int updateUser(UserInfoEntity userInfoEntity) {
        return userDao.updateUser(userInfoEntity);
    }

    @Override
    public int adminUpdateUserInfo(UserInfoEntity userInfoEntity) {
        return userDao.adminUpdateUserInfo(userInfoEntity);
    }

    @Override
    public int deleteUser(UserInfoEntity userInfoEntity) {
        return userDao.deleteUser(userInfoEntity);
    }

    @Override
    public int updateUserPwd(UserInfoEntity userInfoEntity) {
        return userDao.updateUserPwd(userInfoEntity);
    }


    @Override
    public int updateUserLev(UserInfoEntity userInfoEntity) {
        return userDao.updateUserLev(userInfoEntity);
    }

}
